package park;

/**
 * @author 况祥彬
 * @date 2020/12/17 21:20
 **/

public class truck {
    private boolean flag;
    private Integer start;
    private Integer end;
    private Integer truckId;

    public truck(){};

    public truck(Integer truckId){
        this.truckId=truckId;
    }

    public boolean isFlag() {
        return flag;
    }

    public Integer getStart() {
        return start;
    }

    public Integer getEnd() {
        return end;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public void setStart(Integer start) {
        this.start = start;
    }

    public void setEnd(Integer end) {
        this.end = end;
    }

    public void setTruckId(Integer truckId) {
        this.truckId = truckId;
    }

    public Integer getTruckId() {
        return truckId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        truck truck = (truck) o;

        if (flag != truck.flag) return false;
        if (start != null ? !start.equals(truck.start) : truck.start != null) return false;
        return end != null ? end.equals(truck.end) : truck.end == null;
    }

    @Override
    public int hashCode() {
        int result = (flag ? 1 : 0);
        result = 31 * result + (start != null ? start.hashCode() : 0);
        result = 31 * result + (end != null ? end.hashCode() : 0);
        return result;
    }
}
